app.service('commodityService', ['ajax', '$q', function (ajax, $q) {

    this.list = function (data) {
        var deferred = $q.defer();
        ajax.get({
            url: 'back/commodity/page',
            data: data
        }).then(function (result) {
            deferred.resolve(result);
        })
        return deferred.promise;
    }
}]);